import React, { Component } from 'react'
import { HashRouter as Router,Route,Switch,Redirect} from "react-router-dom"
import Index from "./components/index/Index"
import Cart from "./components/cart/Cart"
import My from "./components/my/My"
import Category from "./components/category/Category"
import Tabbar from "./components/tabbar/Tabbar"
import SearchChar from "./components/searchChar/searchChar"
import SwiperGoos from "./components/swiperGoos/swiperGoos"
import GoodList from "./components/goodList/goodList"
export default class RouterConfig extends Component {
    render() {
        return (
            <Router>
                <Route path="/" exact render={ (props)=><Tabbar><Index {...props}></Index></Tabbar> }></Route>
                <Route path="/cart" exact render={ ()=><Tabbar><Cart></Cart></Tabbar> }></Route>
                <Route path="/my" exact render={ ()=><Tabbar><My></My></Tabbar> }></Route>
                <Route path="/category" exact render={ ()=><Tabbar><Category></Category></Tabbar> }></Route>
                <Route path="/searchChar" exact render={ ()=><Tabbar><SearchChar></SearchChar></Tabbar> }></Route>
                <Route path="/swiperGoos:goos" exact render={ (props)=><Tabbar><SwiperGoos {...props}></SwiperGoos></Tabbar> }></Route>
                <Route path="/goodList/:query" exact render={ (props)=><GoodList {...props}></GoodList> }></Route>
            </Router>
        )
    }
}